import React, {Component} from "react"
import {Switch, Route, Redirect} from 'react-router-dom'

import Home from "@/components/home.jsx"
import Kind from "@/components/kind.jsx"
import Cart from "@/components/cart.jsx"
import User from "@/components/user.jsx"


import Header from "@/components/header.jsx"


class App extends Component {
    constructor(props) {
        super(props);
        this.state = {
            list: [1, 2, 3]
        }
    }

    componentDidMount() {

    }

    render() {
        return (
            <div className='box1'>

                <Header>header</Header>
                <div className="content">

                    <Switch>
                        <Route path="/home" component={Home}/>
                        <Route path="/kind" component={Kind}/>
                        <Route path="/cart" component={Cart}/>
                        <Route path="/user" component={User}/>

                            <Redirect to='/home'></Redirect>

                    </Switch>


                </div>

            </div>
        )
    }
}

export default App